package se.teamscape.client.presenter;

import net.customware.gwt.presenter.client.EventBus;
import net.customware.gwt.presenter.client.widget.WidgetPresenter;

/**
 * 
 * LocationAwarePresenter can be extended by presenters whose views have a
 * layout structure that requires known location/index and possibly size of the
 * widgets.
 * 
 * An example is widgets that goes in different directions in a DockPanel, or
 * in the case of a TabView where we might want to insert widgets to a certain
 * tab.
 * 
 * @author Andreas Borglin
 * 
 */
public abstract class LocationAwarePresenter<T extends BaseContainerPresenter.Display> extends
        BaseContainerPresenter<BaseContainerPresenter.Display> {

    private WidgetProperties mWidgetProperties;

    public LocationAwarePresenter(Display display, EventBus eventBus, WidgetPresenter<?>... presenters) {
        super(display, eventBus, presenters);
    }

    public final void setWidgetProperties(WidgetProperties widgetProperties) {
        mWidgetProperties = widgetProperties;
    }

    public final WidgetProperties getWidgetProperties() {
        return mWidgetProperties;
    }
}
